<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
</head>

<body>
<h1>系统首页</h1>

<shiro:user>
    欢迎[[<shiro:principal/>]]登录，<a href="}/logout">点击退出</a><br/>
</shiro:user>

<a th:href="@{/login}">登录</a><br/>
<a th:href="@{/authenticated}">已身份认证</a><br/>
<a th:href="@{/role}">角色授权</a><br/>
<a th:href="@{/permission}">权限授权</a><br/>
<a th:href="@{/logout}">退出</a><br/>

<div shiro:hasPermission="user1:create">
    <a href="/permission">permission</a>
</div>

<div shiro:hasRole="ad1min">
    <a href="/role">role</a>
</div>

</body>

</html>